<template>
  <div class="cir" :style="style">
    <span>{{ text1 }}<br />{{ text2 }}</span>
  </div>
</template>

<script>
export default {
  name: 'MyCircle',
  data() {
    return {
      style: {
        width: this.size + 'px',
        height: this.size + 'px',
        backgroundColor: this.bgColor,
        color: this.fontColor,
        fontSize: this.fontSize + 'px',
        left: this.left + 'px',
        top: this.top + 'px'
      }
    };
  },
  props: {
    size: {
      type: [Number, String],
      default: 164
    },
    bgColor: {
      type: String,
      default: '#ffffff'
    },
    fontColor: {
      type: String,
      default: '#339aca'
    },
    text1: {
      type: String,
      default: '11'
    },
    text2: {
      type: String,
      default: '11'
    },
    fontSize: {
      type: [Number, String],
      default: 22
    },
    left: {
      type: [Number, String],
      default: 18
    },
    top: {
      type: [Number, String],
      default: 100
    }
  }
};
</script>

<style scoped lang="less">
.cir {
  border-radius: 50%;
  text-align: center;
  position: absolute;
  opacity: 0.7;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  transition: all 0.8s ease-out 0s;
  -webkit-transition: all 0.8s ease-out 0s;
  &:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
    transition-duration: 0.2s;
    -webkit-transition-duration: 0.2s;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
  }
  span {
    display: inline-block;
    vertical-align: middle;
  }
  &::after {
    content: '';
    height: 100%;
    display: inline-block;
    vertical-align: middle;
  }
}
</style>
